Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gerber-parser

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gerber-parser

Streaming Gerber/drill file parser

  • 4.2.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
398
decreased by-38.29%
Maintainers
1
Weekly downloads
 
Created
Source

gerber parser

Streaming Gerber/drill file parser

latest next david

A printed circuit board Gerber and drill file parser. Implemented as a Node transform stream that takes a Gerber text stream and emits objects to be consumed by some sort of PCB plotter.

Part of the tracespace collection of PCB visualization tools.

install

npm install --save gerber-parser
# or
yarn add gerber-parser

Or, use a script tag:

<script src="https://unpkg.com/gerber-parser@^4.0.0/dist/gerber-parser.min.js"></script>
<script>
  // global variable gerberParser now available
  var parser = gerberParser()
</script>

example

var fs = require('fs')
var gerberParser = require('gerber-parser')

var parser = gerberParser()

parser.on('warning', function(w) {
  console.warn('warning at line ' + w.line + ': ' + w.message)
})

fs.createReadStream('/path/to/gerber/file.gbr')
  .pipe(parser)
  .on('data', function(obj) {
    console.log(JSON.stringify(obj))
  })

To run this module in a browser, it should be bundled with a tool like browserify or webpack. If you are using the script tag installation method instead, there will be a global variable gerberParser available after you have included gerber-parser.min.js.

api

See API.md

Keywords

FAQs

Package last updated on 12 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc